package com.xmfh.wemedia.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xmfh.wemedia.dto.VideoDTO;
import com.xmfh.wemedia.exception.DatabaseInsertionError;
import com.xmfh.wemedia.mapper.DdPublishLineMapper;
import com.xmfh.wemedia.model.DdPublishLine;
import com.xmfh.wemedia.service.IDdPublishLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author admin
 * @since 2022-04-12
 */
@Service
public class DdPublishLineServiceImpl extends ServiceImpl<DdPublishLineMapper, DdPublishLine> implements IDdPublishLineService {

    @Autowired
    private DdPublishLineMapper mapper;

    @Override
    public void insertNewPublishLine(VideoDTO videoDTO) {
        if (mapper.insertNewPublishLine(videoDTO) != 1)
            throw new DatabaseInsertionError("数据库发生未知错误");
    }
}
